package com.v.im.businessapi.feign;


import com.v.im.businessapi.api.ImChatGroupUserServiceAPI;
import com.v.im.businessapi.dto.resultDTO.ImChatGroupUserResultDTO;
import com.v.im.commonmodule.utils.constants.InterfaceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 *  用戶信息客戶端
 */
@FeignClient(name = InterfaceService.BUSINESS_SERVICE_NAME, fallback = ImChatGroupUserClientService.HystrixClientFallback.class)
public interface ImChatGroupUserClientService extends ImChatGroupUserServiceAPI {

    @Slf4j
    @Component
    class HystrixClientFallback implements ImChatGroupUserClientService {

        @Override
        public List<ImChatGroupUserResultDTO> getImChatGroupResults(String chatGroupId) {
            return new ArrayList<>();
        }
    }
}
